package cn.ltgodm.template.user.service;

import cn.ltgodm.template.common.domain.entity.Dept;
import cn.ltgodm.template.common.domain.vo.DeptVO;
import cn.ltgodm.template.user.domain.param.DeptParam;
import cn.ltgodm.template.user.domain.param.DeptQueryParam;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author wenpeng
* @description 针对表【lt_dept(部门表)】的数据库操作Service
* @createDate 2024-03-17 22:12:11
*/
public interface DeptService extends IService<Dept> {

    IPage<DeptVO> getDeptList(DeptQueryParam deptQueryParam);

    List<DeptVO> getDeptListExcludeChild(Long deptId);

    DeptVO getDeptById(Long deptId);

    boolean checkDeptNameUnique(DeptParam deptParam);

    int insertDept(DeptParam deptParam);

    void checkDeptDataScope(Long deptId);

    int selectNormalChildrenDeptById(Long deptId);

    int updateDept(DeptParam deptParam);

    boolean hasChildByDeptId(Long deptId);

    boolean checkDeptExistUser(Long deptId);

    int deleteDeptById(Long deptId);
}
